package com.tinycloud.miracll.product.service.impl;

import java.util.List;
import com.tinycloud.common.core.utils.DateUtils;
import com.tinycloud.common.datasource.annotation.Slave1;
import com.tinycloud.common.datasource.annotation.Slave3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tinycloud.miracll.product.mapper.ProductAuxisysWeighDetailMapper;
import com.tinycloud.miracll.product.domain.ProductAuxisysWeighDetail;
import com.tinycloud.miracll.product.service.IProductAuxisysWeighDetailService;

/**
 * 自动助剂称量明细Service业务层处理
 * 
 * @author tiny
 * @date 2022-05-13
 */
@Service
@Slave3
public class ProductAuxisysWeighDetailServiceImpl implements IProductAuxisysWeighDetailService 
{
    @Autowired
    private ProductAuxisysWeighDetailMapper productAuxisysWeighDetailMapper;

    /**
     * 查询自动助剂称量明细
     * 
     * @param id 自动助剂称量明细主键
     * @return 自动助剂称量明细
     */
    @Override
    public ProductAuxisysWeighDetail selectProductAuxisysWeighDetailById(String id)
    {
        return productAuxisysWeighDetailMapper.selectProductAuxisysWeighDetailById(id);
    }

    /**
     * 查询自动助剂称量明细列表
     * 
     * @param productAuxisysWeighDetail 自动助剂称量明细
     * @return 自动助剂称量明细
     */
    @Override
    public List<ProductAuxisysWeighDetail> selectProductAuxisysWeighDetailList(ProductAuxisysWeighDetail productAuxisysWeighDetail)
    {
        return productAuxisysWeighDetailMapper.selectProductAuxisysWeighDetailList(productAuxisysWeighDetail);
    }

    /**
     * 新增自动助剂称量明细
     * 
     * @param productAuxisysWeighDetail 自动助剂称量明细
     * @return 结果
     */
    @Override
    public int insertProductAuxisysWeighDetail(ProductAuxisysWeighDetail productAuxisysWeighDetail)
    {
        productAuxisysWeighDetail.setCreateTime(DateUtils.getNowDate());
        return productAuxisysWeighDetailMapper.insertProductAuxisysWeighDetail(productAuxisysWeighDetail);
    }

    /**
     * 修改自动助剂称量明细
     * 
     * @param productAuxisysWeighDetail 自动助剂称量明细
     * @return 结果
     */
    @Override
    public int updateProductAuxisysWeighDetail(ProductAuxisysWeighDetail productAuxisysWeighDetail)
    {
        productAuxisysWeighDetail.setUpdateTime(DateUtils.getNowDate());
        return productAuxisysWeighDetailMapper.updateProductAuxisysWeighDetail(productAuxisysWeighDetail);
    }

    /**
     * 批量删除自动助剂称量明细
     * 
     * @param ids 需要删除的自动助剂称量明细主键
     * @return 结果
     */
    @Override
    public int deleteProductAuxisysWeighDetailByIds(String[] ids)
    {
        return productAuxisysWeighDetailMapper.deleteProductAuxisysWeighDetailByIds(ids);
    }

    /**
     * 删除自动助剂称量明细信息
     * 
     * @param id 自动助剂称量明细主键
     * @return 结果
     */
    @Override
    public int deleteProductAuxisysWeighDetailById(String id)
    {
        return productAuxisysWeighDetailMapper.deleteProductAuxisysWeighDetailById(id);
    }
}
